package com.daxia.ogmall.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import com.daxia.ogmall.model.BaseModel;

import javax.persistence.ManyToOne;
import com.daxia.ogmall.model.User;
import com.daxia.ogmall.model.Community;
import java.util.Date;
import javax.persistence.JoinColumn;
import com.daxia.ogmall.model.HouseStyle;
import com.daxia.ogmall.model.HouseType;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * UserDesign
 */
@Entity
@Table(name = "userdesign") 
public class UserDesign extends BaseModel {
	
	public UserDesign() {
	}
	
	public UserDesign(Long id) {
		this.id = id;
	}
	
	/**
	 * id
	 */
	@Id
	@GeneratedValue
	@Column(name = "id")
    private Long id;
	/**
	 * 楼盘
	 */
	@ManyToOne
	@JoinColumn(name = "community_id")
    private Community community;
	/**
	 * 户型
	 */
	@ManyToOne
	@JoinColumn(name = "houseType_id")
    private HouseType houseType;
	/**
	 * 风格
	 */
	@ManyToOne
	@JoinColumn(name = "houseStyle_id")
    private HouseStyle houseStyle;
	/**
	 * 名称
	 */
	@Column(name = "name")
    private String name;
	/**
	 * 面积
	 */
	@Column(name = "area")
    private String area;
	/**
	 * 用户
	 */
	@ManyToOne
	@JoinColumn(name = "user_id")
    private User user;
	/**
	 * 状态
	 */
	@Column(name = "status")
    private Integer status;
	/**
	 * 创建时间
	 */
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")	
	@Column(name = "createTime")
    private Date createTime;
	/**
	 * 总价
	 */
	@Column(name = "totalPrice")
    private Double totalPrice;
	/**
	 * 封面图片
	 */
	@Column(name = "headImage")
    private String headImage;
	
	public Long getId() {
    	return id;
    }
	
    public void setId(Long id) {
    	this.id = id;
    }
	
	public Community getCommunity() {
    	return community;
    }
	
    public void setCommunity(Community community) {
    	this.community = community;
    }
	
	public HouseType getHouseType() {
    	return houseType;
    }
	
    public void setHouseType(HouseType houseType) {
    	this.houseType = houseType;
    }
	
	public HouseStyle getHouseStyle() {
    	return houseStyle;
    }
	
    public void setHouseStyle(HouseStyle houseStyle) {
    	this.houseStyle = houseStyle;
    }
	
	public String getName() {
    	return name;
    }
	
    public void setName(String name) {
    	this.name = name;
    }
	
	public String getArea() {
    	return area;
    }
	
    public void setArea(String area) {
    	this.area = area;
    }
	
	public User getUser() {
    	return user;
    }
	
    public void setUser(User user) {
    	this.user = user;
    }
	
	public Integer getStatus() {
    	return status;
    }
	
    public void setStatus(Integer status) {
    	this.status = status;
    }
	
	public Date getCreateTime() {
    	return createTime;
    }
	
    public void setCreateTime(Date createTime) {
    	this.createTime = createTime;
    }
	
	public Double getTotalPrice() {
    	return totalPrice;
    }
	
    public void setTotalPrice(Double totalPrice) {
    	this.totalPrice = totalPrice;
    }
	
	public String getHeadImage() {
    	return headImage;
    }
	
    public void setHeadImage(String headImage) {
    	this.headImage = headImage;
    }
	
}
